<include file="Public/min-header"/>

<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">           
                <div class="panel-body ">   
                   	<ul class="nav nav-tabs">
                        <foreach name="group_list" item="vo" key="k">
                     		<li <if condition="$k eq 'sms'">class="active"</if>><a href="javascript:void(0)" data-url="{:U('System/index',array('inc_type'=>$k))}" data-toggle="tab" onclick="goset(this)">{$vo}</a></li>
                     	</foreach>                        
                    </ul>
                    <!--表单数据-->
                    <form method="post" id="handlepost" action="{:U('System/handle')}">                    
                        <!--通用信息-->
                    <div class="tab-content" style="padding:20px 0px;">                 	  
                        <div class="tab-pane active" id="tab_tongyong">                           
                            <table class="table table-bordered">
                                <tbody>
                                <tr>
                                    <td class="col-sm-2">接口地址：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="sms_url" value="{$config.sms_url}" >
                                        <span id="err_attr_name" style="color:#F00; display:none;"></span>                                        
                                    </td>
                                </tr> 
                                <tr>
                                    <td>发送账号：</td>
                                    <td >
                         		<input type="text" class="form-control" name="sms_user" value="{$config.sms_user}" >
                                    </td>
                                </tr>   
                              	<tr>
                                    <td>账号密码：</td>
                                    <td >
                         	         <input type="text" class="form-control" name="sms_pwd" value="{$config.sms_pwd}" >
                                    </td>
                                </tr>
                                 <tr>
                                 <td>注册启用短信：</td>
                                 <td>
                                        <input type="radio" class="" name="regis_sms_enable" <if condition="$config['regis_sms_enable'] eq 1">checked</if> value="1" >是
                                        <input type="radio" class="" name="regis_sms_enable" <if condition="$config['regis_sms_enable'] eq 0">checked</if> value="0" >否
                                  </td>
                                 </tr>                                         
                                 <tr>
                                 <td>短信码超时时间：</td>
                                 <td>
                                     <select name="sms_time_out">
                                         <option value="60" <if condition="$config['sms_time_out'] eq 60">selected="selected"</if>>1分钟</option>
                                         <option value="120"<if condition="$config['sms_time_out'] eq 120">selected="selected"</if>>2分钟</option>
                                         <option value="300"<if condition="$config['sms_time_out'] eq 300">selected="selected"</if>>5分钟</option>
                                         <option value="600"<if condition="$config['sms_time_out'] eq 600">selected="selected"</if>>10分钟</option>
                                         <option value="1200"<if condition="$config['sms_time_out'] eq 1200">selected="selected"</if>>20分钟</option>
                                         <option value="1800"<if condition="$config['sms_time_out'] eq 1800">selected="selected"</if>>30分钟</option>
                                     </select>                                                                                
                                  </td>
                                 </tr>
                                <tr>
                                 <td>短信购买地址：</td>
                                 <td><a target="_blank" href="http://www.sms.cn/index.html">http://www.sms.cn/index.html</a></td>
                                 </tr>                                                                  
                                </tbody> 
                                <tfoot>
                                	<tr>
                                	<td><input type="hidden" name="inc_type" value="{$inc_type}"></td>
                                	<td class="text-right"><input class="btn btn-primary" type="button" onclick="adsubmit()" value="保存"></td></tr>
                                </tfoot>                               
                                </table>
                        </div>                           
                    </div>              
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>
function adsubmit(){
	$('#handlepost').submit();
}

$(document).ready(function(){
	get_province();
});

function goset(obj){
	window.location.href = $(obj).attr('data-url');
}
</script>
</body>
</html>